package com.cmccgz.udacs_landlord_webapp.update;

import android.database.ContentObserver;
import android.os.Handler;

public class DownloadObserver extends ContentObserver {

	private Handler handler;

	/**
	 * Creates a content observer.
	 * 
	 * @param handler
	 *            The handler to run {@link #onChange} on, or null if none.
	 */
	public DownloadObserver(Handler handler) {
		super(handler);
		this.handler = handler;
	}

	@Override
	public void onChange(boolean selfChange) {
		super.onChange(selfChange);
		this.handler.sendEmptyMessage(CheckUpdate.DOWN_LOAD_OB);
	}
}
